# gozerbot/channels.py
#
#

""" channel specific data """

__copyright__ = 'this file is in the public domain'

from gozerbot.pdod import Pdod
 
class Channels(Pdod):

    """ Channels class .. channels object is a pickled dict of lists """

    def getchannels(self):
        """ return channels """
        return self.data.keys()

    def getchannelswithkeys(self):
        """ return channels with keys """
        result = []
        for channel in self.data.keys():
            try:
                key = self.data[channel]['key']
                result.append(channel + ' ' + key)
            except KeyError:
                result.append(channel)
        return result
